{extend name="default/base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/mmgrid/mmGrid.css?v={$v}" />
{/block}
{block name="main"}
<style>
    .mmGrid{width:100% !important;}
    .wst-toolbar{padding:0px;}
</style>
<div id='tab' class="wst-tab-box">
    <ul class="wst-tab-nav ">
        <li>未开票</li>
        <li>已开票</li>
    </ul>
    <div class="wst-tab-content" style='width:100%;'>
        <input type="hidden" id="shopId" class="j-ipt" value='{$shopId}' autocomplete="off"/>
        <div class='wst-tab-item'>
            <div class='wst-toolbar'>
                <input type='text'  id='orderNo' class='j-ipt' placeholder='订单号'/>
                <input type="text" id="startDate" name="startDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='开始日期'/>
                <!--至-->
                <input type="text" id="endDate" name="endDate" class="laydate-icon j-ipt" maxLength="20" value='' placeholder='结束日期'/>
                <a class="btn btn-primary" onclick="loadGrid(0)"><i class="fa fa-search"></i>查询</a>
                <button class="btn btn-primary f-right" style='margin-top:2px' onclick='javascript:toExport(0)'><i class="fa fa-sign-in"></i>导出</button>
                <button class="btn btn-primary f-right " onclick='javascript:toBatchSet(1)' style='margin-top:2px;margin-right: 10px;'>设置为已开票</button>
                <div style='clear:both'></div>
            </div>
            <div class='wst-grid'>
                <div id="mmg" class="mmg"></div>
                <div id="pg" style="text-align: right;"></div>
            </div>
        </div>
        <div class='wst-tab-item' style="display: none">
            <div class='wst-toolbar'>
                <input type='text'  id='orderNo2' class='j-ipt2' placeholder='订单号'/>
                <input type="text" id="startDate2" name="startDate" class="laydate-icon j-ipt2" maxLength="20" value='' placeholder='开始日期'/>
                <!--至-->
                <input type="text" id="endDate2" name="endDate" class="laydate-icon j-ipt2" maxLength="20" value='' placeholder='结束日期'/>
                <a class="btn btn-primary" onclick="loadGrid2(0)"><i class="fa fa-search"></i>查询</a>
                <button class="btn btn-primary f-right" style='margin-top:2px' onclick='javascript:toExport(1)'><i class="fa fa-sign-in"></i>导出</button>
                <button class="btn btn-primary f-right " onclick='javascript:toBatchSet(0)' style='margin-top:2px;margin-right: 10px;'>设置为未开票</button>
                <div style='clear:both'></div>
            </div>
            <div class='wst-grid'>
                <div id="mmg2" class="mmg2"></div>
                <div id="pg2" style="text-align: right;"></div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<script type='text/javascript' src='__ROOT__/static/plugins/lazyload/jquery.lazyload.min.js?v={$v}'></script>
<script src="__STATIC__/plugins/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
<script type='text/javascript' src='__SHOP__/orders/invoices.js?v={$v}'></script>
<script>
     $(function(){
          $('#tab').TabPanel({tab:0,callback:function(tab){
              switch(tab){
                  case 0:initGrid();break;
                  case 1:initGrid2();break;
              }
          }});
     });
</script>
{/block}
